package com.timmy.google_play.holder.category;

import android.view.View;
import android.widget.TextView;

import com.timmy.google_play.base.BaseHolder;
import com.timmy.google_play.bean.CategoryBean;
import com.timmy.google_play.utils.UIUtils;

/**
 * Created by Timmy on 2016/12/13.
 */
public class CategoryTitleHolder extends BaseHolder<CategoryBean> {

    private TextView mTv;

    @Override
    protected View initHolderVIew() {
        mTv = new TextView(UIUtils.getContext());

        int padding = UIUtils.dp2px(4);

        mTv.setPadding(padding,padding,padding,padding);

        return mTv;
    }

    @Override
    protected void refreshHolderView(CategoryBean data) {

        mTv.setText(data.title);
    }
}
